#name = input("Please enter your name: ")
#print("Hello, "+name+'!')

# 字符串转成数值
print(89 == int('89'))

current_number = 1
while current_number <= 5:
    print(current_number)
    current_number += 1



prompt = "\nTell me something, and I will repeat it back to you:" 
prompt += "\nEnter 'quit' to end the program. \n"
message = ""
while message != 'quit':
    message = input(prompt) 
    print(message)

#break 退出循环
#continue 忽略余下代码，开始下一次循环

while True:
    city = input(prompt)    
    if city == 'quit':
        break
    else:
        print("I'd love to go to " + city.title() + "!")


# for 循环中不应修改列表，否则将导致Python难以跟踪其中的元素
# while 循环可以在遍历列表的同时对其进行修改


# 首先，创建一个待验证用户列表和一个用于存储已验证用户的空列表
unconfirmed_users = ['alice', 'brian', 'candace']
confirmed_users = []
# 验证每个用户，直到没有未验证用户为止
# 将每个经过验证的列表都移到已验证用户列表中 
while unconfirmed_users:
    current_user = unconfirmed_users.pop()  #pop方法表示弹出末尾值，赋值并删除
    print("Verifying user: " + current_user.title()) 
    confirmed_users.append(current_user)
# 显示所有已验证的用户
print("\nThe following users have been confirmed:") 
for confirmed_user in confirmed_users:
    print(confirmed_user.title())







